/**
 * 
 */
package com.demo2do.boyle.backend.service.system.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.demo2do.boyle.backend.service.system.VariableService;
import com.demo2do.boyle.common.entity.system.Variable;
import com.demo2do.core.persistence.GenericDaoSupport;
import com.demo2do.core.service.impl.GenericServiceImpl;

/**
 * @author Leo Jason.Y
 *
 */
@Service("variableService")
public class VariableServiceImpl extends GenericServiceImpl<Variable> implements VariableService {

	@Autowired 
	private GenericDaoSupport genericDaoSupport;
	
	/*
	 * (non-Javadoc)
	 * @see com.demo2do.boyle.backend.service.system.VariableService#list()
	 */
	@SuppressWarnings("unchecked")
	public List<Variable> list() {
		List<Variable> variables = genericDaoSupport.searchForList("FROM Variable");
		return variables;
	}

	@Override
	public Variable queryObjectForId(Integer id) {
		Variable variable = genericDaoSupport.load(Variable.class, id);
		return variable;
	}
	
	
}
